using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._DisconnectedEditing
{
    /// <summary>
    /// <para>Check Out</para>
    /// <para>Creates a check-out replica from datasets in ArcSDE.</para>
    /// <para>根据 ArcSDE 中的数据集创建检出复本。</para>
    /// </summary>    
    [DisplayName("Check Out")]
    public class Checkout : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Checkout()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_data">
        /// <para>Check-out Data</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_out_workspace">
        /// <para>Check-out to Workspace</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_out_name">
        /// <para>Check-out Name</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        public Checkout(List<object> _in_data, object _out_workspace, object _out_name)
        {
            this._in_data = _in_data;
            this._out_workspace = _out_workspace;
            this._out_name = _out_name;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Check Out";

        public override string CallName => "management.Checkout";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_data, _out_workspace, _out_name, _in_type.GetGPValue(), _reuse_schema.GetGPValue(), _get_related_data.GetGPValue()];

        /// <summary>
        /// <para>Check-out Data</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Check-out Data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_data { get; set; }


        /// <summary>
        /// <para>Check-out to Workspace</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Check-out to Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_workspace { get; set; }


        /// <summary>
        /// <para>Check-out Name</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Check-out Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_name { get; set; }


        /// <summary>
        /// <para>Check-out Type</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Check-out Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _in_type_value _in_type { get; set; } = _in_type_value._DATA;

        public enum _in_type_value
        {
            /// <summary>
            /// <para>DATA</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DATA")]
            [GPEnumValue("DATA")]
            _DATA,

            /// <summary>
            /// <para>SCHEMA_ONLY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SCHEMA_ONLY")]
            [GPEnumValue("SCHEMA_ONLY")]
            _SCHEMA_ONLY,

        }

        /// <summary>
        /// <para>Re-use schema if this geodatabase was used for a check-out before</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Re-use schema if this geodatabase was used for a check-out before")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _reuse_schema_value _reuse_schema { get; set; } = _reuse_schema_value._false;

        public enum _reuse_schema_value
        {
            /// <summary>
            /// <para>REUSE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REUSE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_REUSE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_REUSE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Check out related data</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Check out related data")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _get_related_data_value _get_related_data { get; set; } = _get_related_data_value._true;

        public enum _get_related_data_value
        {
            /// <summary>
            /// <para>RELATED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("RELATED")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_RELATED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_RELATED")]
            [GPEnumValue("false")]
            _false,

        }

        public Checkout SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}